from socket import *
from PythonCard import model
HOST = ''
PORT = 9000
ADDR = (HOST,PORT)
BUFSIZE = 4096
Client = socket (AF_INET,SOCK_STREAM)
ADDR = (HOST,PORT)
class MainWindow(model.Background):

    def on_ConnectButton_mouseClick(self, event):
	Client.connect((ADDR))
	Client.send('M')
    def on_DisConnect_mouseClick(self, event):
	Client.send('X')
    def on_FwdBtn_mouseClick(self, event):
        Client.send('1')
    def on_LftBtn_mouseClick(self, event):
        Client.send('2')
    def on_RitBtn_mouseClick(self, event):
        Client.send('3')
    def on_RevBtn_mouseClick(self, event):
        Client.send('4')
    def on_StpBtn_mouseClick(self, event):
        Client.send('0')
app = model.Application(MainWindow)
app.MainLoop()
        

